#include <gtkmm.h>
#include "controlFile.h"
#include "editWindow.h"

class mainWindow:public Gtk::Window
{
    public:
        mainWindow();
        virtual ~mainWindow();


    protected:

        class itemColumn:public Gtk::TreeModel::ColumnRecord
        {
            public:
                Gtk::TreeModelColumn<Glib::ustring> Title;
                Gtk::TreeModelColumn<Glib::ustring> Inf1;
                Gtk::TreeModelColumn<int> node;
                itemColumn()
                {
                    add(node);
                    add(Title);
                    add(Inf1);
                }
        };
        itemColumn m_itemColumn;

        Gtk::Button btnAdd,btnDelete,btnEdit;
        Gtk::Box boxItem,boxFrame,boxButton;
        Gtk::ScrolledWindow msw;
        Gtk::TreeView m_TreeView;
        Glib::RefPtr<Gtk::ListStore> refListStore;

        void InitSignal();
        void on_btnAdd_Clicked();
        void on_btnDelete_clicked();
        void on_btnEdit_clicked();
        void on_editWindow_Filish(editRelease data,int mode);
        void on_treeview_row_activate(const Gtk::TreeModel::Path &,Gtk::TreeViewColumn *);

        void editWindowReturn();
        controlFile cFile;

        std::unique_ptr<editWindow> refeditWindow;

};